package com.woldier.check;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.woldier.mp.entity.File;
import com.woldier.mp.entity.Repository;
import com.woldier.mp.service.FileService;
import com.woldier.mp.service.RepositoryService;
import lombok.AllArgsConstructor;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class checkMybatis {

    @Autowired
    FileService fileService;
    @Autowired
    RepositoryService repositoryService;
    @Test
    public void test1(){
        for (File file : fileService.list()) {
            System.out.println(file);
        }

    }

    @Test
    public void test2(){
        //repositoryService.saveOrUpdate(Repository.builder().userName("woldier").nameRepo("woldier/demo").build());
        for (Repository repository : repositoryService.list()) {
            System.out.println(repository);
        }

    }
}
